
//
//  MySevenCollectionViewCell.m
//  CommunitySupermarketProiect
//
//  Created by 吕惠卿 on 2017/11/21.
//  Copyright © 2017年 吕惠卿. All rights reserved.
//

#import "MySevenCollectionViewCell.h"

@implementation MySevenCollectionViewCell
-(id)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self creatUI];
    }
    return self;
}
-(void)creatUI{
    _leftImg = [[UIImageView alloc]init];
    [self addSubview:_leftImg];
    [_leftImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).with.offset(8);
        make.height.mas_equalTo(20);
        make.width.mas_equalTo(20);
        make.centerY.mas_equalTo(self);
    }];
    
    _nameLab = [[UILabel alloc]init];
    _nameLab.textColor = [UIColor grayColor];
    _nameLab.font = [UIFont systemFontOfSize:15.0];
    _nameLab.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_nameLab];
    [_nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
       make.left.equalTo(_leftImg.mas_right).with.offset(3);
        make.height.mas_equalTo(25);
        make.width.mas_equalTo(150);
        make.centerY.mas_equalTo(self);
    }];
    _jImg = [[UIImageView alloc]init];
    _jImg.image = [UIImage imageNamed:@"我的右三角"];
    [self addSubview:_jImg];
    [_jImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right).with.offset(-10);
        make.width.mas_equalTo(7);
        make.height.mas_equalTo(15);
        make.centerY.mas_equalTo(self);
    }];
    _line = [[UIImageView alloc]init];
    _line.backgroundColor = LineColor;
    [self addSubview:_line];
    [_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.contentView.mas_bottom).with.offset(0);
        make.left.equalTo(self.contentView.mas_left).with.offset(0);
        make.right.equalTo(self.contentView.mas_right).with.offset(0);
        make.height.mas_equalTo(1);
    }];
    
}

@end
